<?php

namespace App\Admin\Actions\Post;

use Encore\Admin\Actions\Action;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
use App\Imports\ResumeImport;
use App\Models\Resume;
use Carbon\Carbon;
use App\Exports\ResumeExport;
use Encore\Admin\Facades\Admin;

class DownloadPost extends Action
{
    public $name = '下载简历';

    protected function script()
    {
        return <<<EOT
$('#resume-export').click(function () {
     location.href = "/admin/resumes/export";
    
});
EOT;

    }
    

    public function html()
    {

        Admin::script($this->script());
        return <<<HTML
        <a class="btn btn-sm btn-default" id="resume-export"><i class="fa fa-upload"></i>下载简历</a>
HTML;
    }
}